Optimal. Leaf size=107 \[ \frac{2 A \sqrt{a-b} (a+b) \cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a-b}}\right )|\frac{a-b}{a+b}\right )}{b^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0849392, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.031, Rules used = {4004} \[ \frac{2 A \sqrt{a-b} (a+b) \cot (e+f x) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (\sec (e+f x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a-b}}\right )|\frac{a-b}{a+b}\right )}{b^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4004
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (A-A \sec (e+f x))}{\sqrt{a+b \sec (e+f x)}} \, dx &=\frac{2 A \sqrt{a-b} (a+b) \cot (e+f x) E\left (\sin ^{-1}\left (\frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{a-b}}\right )|\frac{a-b}{a+b}\right ) \sqrt{\frac{b (1-\sec (e+f x))}{a+b}} \sqrt{-\frac{b (1+\sec (e+f x))}{a-b}}}{b^2 f}\\ \end{align*}
Mathematica [A] time = 8.09658, size = 211, normalized size = 1.97 \[ \frac{A (a+b) \sec ^2\left (\frac{1}{2} (e+f x)\right ) \sqrt{\sec (e+f x)} \sqrt{\frac{a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}} \left (\sqrt{\frac{\cos (e+f x)}{\cos (e+f x)+1}} \sqrt{\sec (e+f x)+1} E\left (\sin ^{-1}\left (\tan \left (\frac{1}{2} (e+f x)\right )\right )|\frac{a-b}{a+b}\right )-\sin (e+f x) \sqrt{\frac{1}{\cos (e+f x)+1}} \sqrt{\sec (e+f x)} \sqrt{\frac{a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}}\right )}{b f \left (\frac{1}{\cos (e+f x)+1}\right )^{3/2} \sqrt{a+b \sec (e+f x)}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.427, size = 457, normalized size = 4.3 \begin{align*} -2\,{\frac{A \left ( 1+\cos \left ( fx+e \right ) \right ) ^{2} \left ( -1+\cos \left ( fx+e \right ) \right ) ^{2}}{fb \left ( \sin \left ( fx+e \right ) \right ) ^{5} \left ( a\cos \left ( fx+e \right ) +b \right ) }\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{\cos \left ( fx+e \right ) }}} \left ( \cos \left ( fx+e \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}\sin \left ( fx+e \right ){\it EllipticE} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) a+\cos \left ( fx+e \right ) \sqrt{{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}\sin \left ( fx+e \right ){\it EllipticE} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) b+\sqrt{{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}\sin \left ( fx+e \right ){\it EllipticE} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) a+\sqrt{{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}{\it EllipticE} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }},\sqrt{{\frac{a-b}{a+b}}} \right ) b\sin \left ( fx+e \right ) - \left ( \cos \left ( fx+e \right ) \right ) ^{2}a+a\cos \left ( fx+e \right ) -b\cos \left ( fx+e \right ) +b \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{{\left (A \sec \left (f x + e\right ) - A\right )} \sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{A \sec \left (f x + e\right )^{2} - A \sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right ) + a}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - A \left (\int - \frac{\sec{\left (e + f x \right )}}{\sqrt{a + b \sec{\left (e + f x \right )}}}\, dx + \int \frac{\sec ^{2}{\left (e + f x \right )}}{\sqrt{a + b \sec{\left (e + f x \right )}}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{{\left (A \sec \left (f x + e\right ) - A\right )} \sec \left (f x + e\right )}{\sqrt{b \sec \left (f x + e\right ) + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]